package com.turtle3d.gui.fractaloptions;

import javax.swing.DefaultComboBoxModel;

import com.turtle3d.App;
import com.turtle3d.ResourceManager;

/**
 * ComboBoxModel for Grammar and Visualzator classes.
 * 
 * @author Marek Paterczyk <marek.paterczyk@gmail.com>
 *
 */
public class ResourceComboBoxModel extends DefaultComboBoxModel
{
	
	public static final int GRAMMARS=1, VISUALIZATORS=2;

	public ResourceComboBoxModel(int resource)
	{
		
		switch(resource){
			case GRAMMARS:{
				for(String grammarName: ResourceManager.getGrammarsList()){
					
					addElement(grammarName);					
					
				}		
				break;
			}
			case VISUALIZATORS:{
				for(String visualizatorName: ResourceManager.getVisualizatorsList()){
					
					addElement(visualizatorName);
					
				}	
				break;
			}
			default: break;
			
		}
	

	}

}
